import request from './request.js';
import qs from 'qs';

// export const xxx = () => requset.get('xxx');
// export const xxx = (params) => requset.get('xxx', { params });
// export const xxx = (params) => requset.post('xxx'，params);

// 登录
export const LoginApi = (params) => request.post('/login', params);

// 全部订单
export const AllOderApi = (params) => request.get('/order/v1/list', { params });

// 待发货单
export const ShipOderApi = (params) => request.get('/order/v1/list/1', { params });

// 待收货单
export const GetOderApi = (params) => request.get('/order/v1/list/2', { params });

// 待评价单
export const EvaluationOderApi = (params) => request.get('/order/v1/list/3', { params });

// 订单详情
export const OderInfoApi = (params) => request.get('order/v1/orderInfo/' + params.serialNo);

// 发货
export const SendOderApi = (params) => request.post('/order/v1/send', params);

// 确认收货
export const ConfirmOderApi = (params) => request.post('/order/v1/confirmReceipt/' + params.serialNo);

// 提交评价
export const EvaluateApi = (params) => request.post('/order/v1/evaluate', params);

// 查看评价
export const EvaluateInfoApi = (params) => request.get('/order/v1/evaluateInfo/' + params.serialNo);

// 全部消息
export const MessageApi = (params) => request.get('/api/message', { params });

// 消息详情
export const MessageDetailApi = (params) => request.get('/api/message/' + params.id);

// 标记已读
export const DidReadApi = (params) => request.put('api/message/updates', qs.stringify(params));

// 用户个人信息展示
export const UserListApi = () => request.get('users/list');

// 用户个人信息详情
export const UserInfoApi = () => request.get('users/info');

// 版本信息展示
export const UserVersionApi = () => request.get('users/version');

// 物流单列表
export const WuLiuListApi = (params) => request.get('api/star', { params });

// 查询物流单评价详情
export const WuLiuDetailApi = (params) => request.get('api/star/' + params.id);

// 提交物流单评价
export const SubmitApi = (params) => request.put('api/star', params);
